/*
 * 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。[遇见知启蒙，邂逅框架梦，本文采用木兰宽松许可证第2版]
 * 
 * https://zhiqim.org/project/zhiqim_components/zhiqim_upload_large.htm
 *
 * Zhiqim UploadLarge is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *          http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */
package org.zhiqim.uploadlarge.dbo;

import java.io.Serializable;
import java.sql.Timestamp;

import org.zhiqim.kernel.annotation.AnAlias;
import org.zhiqim.kernel.annotation.AnNew;
import org.zhiqim.kernel.json.Jsons;
import org.zhiqim.orm.annotation.*;

/**
 * 大文件上传文件表 对应表《UPLL_FILE》
 */
@AnAlias("UpllFile")
@AnNew
@AnTable(table="UPLL_FILE", key="FILE_ID", type="InnoDB")
@AnIndex({@AnIndexValue(name="IX_UPLL_FILE_MD5", column="FILE_MD5", unique=false)})
public class UpllFile implements Serializable
{
    private static final long serialVersionUID = 1L;

    @AnTableField(column="FILE_ID", type="string,32,char", notNull=true)    private String fileId;    //1.文件编号，一次上传一条记录
    @AnTableField(column="FILE_MD5", type="string,48,char", notNull=true)    private String fileMd5;    //2.文件MD5，消息摘要唯一性，对应URL的文件名，两条记录MD5的文件只保留一份URL和文件
    @AnTableField(column="FILE_NAME", type="string,512", notNull=true)    private String fileName;    //3.文件名称，由用户指定的文件名，对应下载的文件名
    @AnTableField(column="FILE_EXT", type="string,10", notNull=true)    private String fileExt;    //4.文件扩展名
    @AnTableField(column="FILE_LENGTH", type="long", notNull=true)    private long fileLength;    //5.文件长度
    @AnTableField(column="FILE_RELATIVE_PATH", type="string,200", notNull=true)    private String fileRelativePath;    //6.文件路径，保存到硬盘相对于根目录的路径，路径以/为准，开头没有/
    @AnTableField(column="FILE_URL", type="string,200", notNull=true)    private String fileUrl;    //7.文件URL，通过文件目录和指定的域名前缀生成
    @AnTableField(column="FILE_TIME", type="datetime", notNull=true)    private Timestamp fileTime;    //8.文件上传成功时间
    @AnTableField(column="CONTENT_TYPE", type="string,100", notNull=false)    private String contentType;    //9.内容类型消息头
    @AnTableField(column="CONTENT_ENCODING", type="string,20", notNull=false)    private String contentEncoding;    //10.内容编码消息头
    @AnTableField(column="CACHE_CONTROL", type="string,50", notNull=false)    private String cacheControl;    //11.缓存消息头，no-store,max-age在这里面配置

    public String toString()
    {
        return Jsons.toString(this);
    }

    public String getFileId()
    {
        return fileId;
    }

    public void setFileId(String fileId)
    {
        this.fileId = fileId;
    }

    public String getFileMd5()
    {
        return fileMd5;
    }

    public void setFileMd5(String fileMd5)
    {
        this.fileMd5 = fileMd5;
    }

    public String getFileName()
    {
        return fileName;
    }

    public void setFileName(String fileName)
    {
        this.fileName = fileName;
    }

    public String getFileExt()
    {
        return fileExt;
    }

    public void setFileExt(String fileExt)
    {
        this.fileExt = fileExt;
    }

    public long getFileLength()
    {
        return fileLength;
    }

    public void setFileLength(long fileLength)
    {
        this.fileLength = fileLength;
    }

    public String getFileRelativePath()
    {
        return fileRelativePath;
    }

    public void setFileRelativePath(String fileRelativePath)
    {
        this.fileRelativePath = fileRelativePath;
    }

    public String getFileUrl()
    {
        return fileUrl;
    }

    public void setFileUrl(String fileUrl)
    {
        this.fileUrl = fileUrl;
    }

    public Timestamp getFileTime()
    {
        return fileTime;
    }

    public void setFileTime(Timestamp fileTime)
    {
        this.fileTime = fileTime;
    }

    public String getContentType()
    {
        return contentType;
    }

    public void setContentType(String contentType)
    {
        this.contentType = contentType;
    }

    public String getContentEncoding()
    {
        return contentEncoding;
    }

    public void setContentEncoding(String contentEncoding)
    {
        this.contentEncoding = contentEncoding;
    }

    public String getCacheControl()
    {
        return cacheControl;
    }

    public void setCacheControl(String cacheControl)
    {
        this.cacheControl = cacheControl;
    }

}
